#ifndef __SERIAL_SCREEN_H__
#define __SERIAL_SCREEN_H__

#include "common_def.h"
#include "soc_osal.h"

#include "bsp_uart.h"

#define SERIAL_SCREEN_ID_MAX 2 // 串口屏界面ID最大值

// 按钮状态定义
typedef enum
{
    BUTTON_OFF = 0x00, // 按钮未按下
    BUTTON_ON = 0x01,  // 按钮按下
} button_state_t;

// 网络状态定义
typedef enum
{
    NETWORK_DISCONNECT = 0x00, // 网络已断开
    NETWORK_CONNECT = 0x01,    // 网络已连接
} network_state_t;

// 串口屏接口函数声明
errcode_t SerialScreen_Init(void);
void SerialScreen_Reset(void);
errcode_t SerialScreen_SendCommand(uint8_t cmd_id);
void SerialScreen_ReportNetworkState(network_state_t state);
void SerialScreen_SetSystemTime(uint8_t hour, uint8_t minute, uint8_t second);
void SerialScreen_ReportTemperature(float temp);
void SerialScreen_ReportHumidity(float Humi);
void SerialScreen_ReportLight(uint16_t Illum);
void data_report(char data[][15],uint8_t len);
void data_report2(char data[][10], uint8_t len);
void network_state(uint8_t state);

#endif //__SERIAL_SCREEN_H__
